package com.cn.ysf.newbeemall.controller.admin;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * @author ysf
 * @date 2019/12/14 15:32
 */
@Controller
@RequestMapping("admin")
public class SystemManageController {

    /**
     * 后台退出功能
     * @param session
     * @return
     */
   @RequestMapping("logout")
    public String logout(HttpSession session){
       session.removeAttribute("loginUser");
       session.removeAttribute("loginUserId");
       session.removeAttribute("errorMsg");
        return "admin/login";
    }

}
